.class public Lrexsee/device/RexseeScreen;
.super Ljava/lang/Object;
.source "RexseeScreen.java"

# interfaces
.implements Lrexsee/core/browser/clazz/JavascriptInterface;


# static fields
.field public static final INTERFACE_NAME:Ljava/lang/String; = "Screen"

.field public static final SCREEN_ORIENTATION_AUTO:Ljava/lang/String; = "auto"

.field public static final SCREEN_ORIENTATION_LANDSCAPE:Ljava/lang/String; = "landscape"

.field public static final SCREEN_ORIENTATION_PORTRAIT:Ljava/lang/String; = "portrait"


# instance fields
.field public fullScreen:Z

.field private final mBrowser:Lrexsee/core/browser/Browser;

.field private final mContext:Landroid/content/Context;

.field private final mLayout:Lrexsee/core/browser/clazz/RootViewInterface;

.field public screenAlwaysOn:Z

.field public screenOrientation:Ljava/lang/String;


# direct methods
.method public constructor <init>(Lrexsee/core/browser/clazz/RootViewInterface;)V
    .locals 2
    .param p1, "rootView"    # Lrexsee/core/browser/clazz/RootViewInterface;

    .prologue
    const/4 v1, 0x0

    .line 50
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 42
    const-string v0, "auto"

    iput-object v0, p0, Lrexsee/device/RexseeScreen;->screenOrientation:Ljava/lang/String;

    .line 43
    iput-boolean v1, p0, Lrexsee/device/RexseeScreen;->fullScreen:Z

    .line 44
    iput-boolean v1, p0, Lrexsee/device/RexseeScreen;->screenAlwaysOn:Z

    .line 51
    iput-object p1, p0, Lrexsee/device/RexseeScreen;->mLayout:Lrexsee/core/browser/clazz/RootViewInterface;

    .line 52
    invoke-interface {p1}, Lrexsee/core/browser/clazz/RootViewInterface;->getBrowser()Lrexsee/core/browser/Browser;

    move-result-object v0

    iput-object v0, p0, Lrexsee/device/RexseeScreen;->mBrowser:Lrexsee/core/browser/Browser;

    .line 53
    iget-object v0, p0, Lrexsee/device/RexseeScreen;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {v0}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v0

    iput-object v0, p0, Lrexsee/device/RexseeScreen;->mContext:Landroid/content/Context;

    .line 54
    iget-object v0, p0, Lrexsee/device/RexseeScreen;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v0, v0, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v0, v0, Lrexsee/core/application/Resource;->screenOrientation:Ljava/lang/String;

    const-string v1, "none"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 55
    iget-object v0, p0, Lrexsee/device/RexseeScreen;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v0, v0, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v0, v0, Lrexsee/core/application/Resource;->screenOrientation:Ljava/lang/String;

    invoke-virtual {p0, v0}, Lrexsee/device/RexseeScreen;->setScreenOrientation(Ljava/lang/String;)V

    .line 57
    :cond_0
    return-void
.end method

.method static synthetic access$0(Lrexsee/device/RexseeScreen;)Landroid/content/Context;
    .locals 1

    .prologue
    .line 47
    iget-object v0, p0, Lrexsee/device/RexseeScreen;->mContext:Landroid/content/Context;

    return-object v0
.end method

.method public static printView(Lrexsee/core/browser/Browser;Ljava/lang/String;Landroid/view/View;ZI)Z
    .locals 9
    .param p0, "browser"    # Lrexsee/core/browser/Browser;
    .param p1, "path"    # Ljava/lang/String;
    .param p2, "view"    # Landroid/view/View;
    .param p3, "png"    # Z
    .param p4, "quality"    # I

    .prologue
    const/4 v7, 0x0

    const-string v8, "printView"

    .line 59
    if-eqz p3, :cond_0

    sget-object v6, Landroid/graphics/Bitmap$CompressFormat;->PNG:Landroid/graphics/Bitmap$CompressFormat;

    move-object v4, v6

    .line 60
    .local v4, "format":Landroid/graphics/Bitmap$CompressFormat;
    :goto_0
    invoke-static {p1}, Lrexsee/core/utilities/Utilities;->prepareWriteFile(Ljava/lang/String;)Ljava/io/File;

    move-result-object v2

    .line 61
    .local v2, "file":Ljava/io/File;
    if-nez v2, :cond_1

    .line 62
    const-string v6, "printView"

    const-string v6, "Invalid path."

    invoke-virtual {p0, v8, v6}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    move v6, v7

    .line 82
    :goto_1
    return v6

    .line 59
    .end local v2    # "file":Ljava/io/File;
    .end local v4    # "format":Landroid/graphics/Bitmap$CompressFormat;
    :cond_0
    sget-object v6, Landroid/graphics/Bitmap$CompressFormat;->JPEG:Landroid/graphics/Bitmap$CompressFormat;

    move-object v4, v6

    goto :goto_0

    .line 65
    .restart local v2    # "file":Ljava/io/File;
    .restart local v4    # "format":Landroid/graphics/Bitmap$CompressFormat;
    :cond_1
    const/4 v6, 0x1

    invoke-virtual {p2, v6}, Landroid/view/View;->setDrawingCacheEnabled(Z)V

    .line 66
    invoke-virtual {p2}, Landroid/view/View;->destroyDrawingCache()V

    .line 67
    invoke-virtual {p2}, Landroid/view/View;->getDrawingCache()Landroid/graphics/Bitmap;

    move-result-object v0

    .line 68
    .local v0, "bitmap":Landroid/graphics/Bitmap;
    if-nez v0, :cond_2

    .line 69
    const-string v6, "printView"

    const-string v6, "Print layout error."

    invoke-virtual {p0, v8, v6}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    move v6, v7

    .line 70
    goto :goto_1

    .line 73
    :cond_2
    :try_start_0
    new-instance v3, Ljava/io/FileOutputStream;

    invoke-direct {v3, v2}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V

    .line 74
    .local v3, "fileOutput":Ljava/io/FileOutputStream;
    invoke-virtual {v0, v4, p4, v3}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z

    move-result v5

    .line 75
    .local v5, "rtn":Z
    invoke-virtual {v3}, Ljava/io/FileOutputStream;->flush()V

    .line 76
    invoke-virtual {v3}, Ljava/io/FileOutputStream;->close()V

    .line 77
    invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 78
    const/4 v0, 0x0

    move v6, v5

    .line 79
    goto :goto_1

    .line 80
    .end local v3    # "fileOutput":Ljava/io/FileOutputStream;
    .end local v5    # "rtn":Z
    :catch_0
    move-exception v6

    move-object v1, v6

    .line 81
    .local v1, "e":Ljava/lang/Exception;
    const-string v6, "printView"

    invoke-virtual {p0, v8, v1}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/Exception;)V

    move v6, v7

    .line 82
    goto :goto_1
.end method


# virtual methods
.method public enableAutomaticBrightness(Z)V
    .locals 4
    .param p1, "enable"    # Z

    .prologue
    .line 170
    :try_start_0
    iget-object v2, p0, Lrexsee/device/RexseeScreen;->mContext:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    .line 171
    .local v1, "resolver":Landroid/content/ContentResolver;
    const-string v2, "screen_brightness_mode"

    if-eqz p1, :cond_0

    const/4 v3, 0x1

    :goto_0
    invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 175
    .end local v1    # "resolver":Landroid/content/ContentResolver;
    :goto_1
    return-void

    .line 171
    .restart local v1    # "resolver":Landroid/content/ContentResolver;
    :cond_0
    const/4 v3, 0x0

    goto :goto_0

    .line 172
    .end local v1    # "resolver":Landroid/content/ContentResolver;
    :catch_0
    move-exception v2

    move-object v0, v2

    .line 173
    .local v0, "e":Ljava/lang/Exception;
    iget-object v2, p0, Lrexsee/device/RexseeScreen;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/device/RexseeScreen;->getInterfaceName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3, v0}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_1
.end method

.method public getCurrentScreenOrientation()Ljava/lang/String;
    .locals 3

    .prologue
    .line 110
    new-instance v0, Landroid/util/DisplayMetrics;

    invoke-direct {v0}, Landroid/util/DisplayMetrics;-><init>()V

    .line 111
    .local v0, "displayMetrics":Landroid/util/DisplayMetrics;
    iget-object p0, p0, Lrexsee/device/RexseeScreen;->mContext:Landroid/content/Context;

    .end local p0    # "this":Lrexsee/device/RexseeScreen;
    check-cast p0, Landroid/app/Activity;

    invoke-virtual {p0}, Landroid/app/Activity;->getWindowManager()Landroid/view/WindowManager;

    move-result-object v1

    invoke-interface {v1}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v1

    invoke-virtual {v1, v0}, Landroid/view/Display;->getMetrics(Landroid/util/DisplayMetrics;)V

    .line 112
    iget v1, v0, Landroid/util/DisplayMetrics;->widthPixels:I

    iget v2, v0, Landroid/util/DisplayMetrics;->heightPixels:I

    if-le v1, v2, :cond_0

    const-string v1, "landscape"

    :goto_0
    return-object v1

    :cond_0
    const-string v1, "portrait"

    goto :goto_0
.end method

.method public getInheritInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 0
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 31
    return-object p0
.end method

.method public getInterfaceName()Ljava/lang/String;
    .locals 2

    .prologue
    .line 27
    new-instance v0, Ljava/lang/StringBuilder;

    iget-object v1, p0, Lrexsee/device/RexseeScreen;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v1, v1, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v1, v1, Lrexsee/core/application/Resource;->prefix:Ljava/lang/String;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "Screen"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getNewInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 35
    const/4 v0, 0x0

    return-object v0
.end method

.method public getNoticeBarHeight()I
    .locals 1

    .prologue
    .line 141
    iget-boolean v0, p0, Lrexsee/device/RexseeScreen;->fullScreen:Z

    if-eqz v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    iget-object v0, p0, Lrexsee/device/RexseeScreen;->mLayout:Lrexsee/core/browser/clazz/RootViewInterface;

    invoke-interface {v0}, Lrexsee/core/browser/clazz/RootViewInterface;->getRect()Landroid/graphics/Rect;

    move-result-object v0

    iget v0, v0, Landroid/graphics/Rect;->top:I

    goto :goto_0
.end method

.method public getScreenBrightness()I
    .locals 4

    .prologue
    .line 187
    :try_start_0
    iget-object v2, p0, Lrexsee/device/RexseeScreen;->mContext:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    .line 188
    .local v1, "resolver":Landroid/content/ContentResolver;
    const-string v2, "screen_brightness"

    invoke-static {v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;)I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v2

    .line 191
    .end local v1    # "resolver":Landroid/content/ContentResolver;
    :goto_0
    return v2

    .line 189
    :catch_0
    move-exception v2

    move-object v0, v2

    .line 190
    .local v0, "e":Ljava/lang/Exception;
    iget-object v2, p0, Lrexsee/device/RexseeScreen;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/device/RexseeScreen;->getInterfaceName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3, v0}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/Exception;)V

    .line 191
    const/4 v2, -0x1

    goto :goto_0
.end method

.method public getScreenDensityScale()F
    .locals 1

    .prologue
    .line 138
    iget-object v0, p0, Lrexsee/device/RexseeScreen;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget v0, v0, Lrexsee/core/application/RexseeApplication;->screenDensity:F

    return v0
.end method

.method public getScreenHeight()I
    .locals 1

    .prologue
    .line 135
    iget-object v0, p0, Lrexsee/device/RexseeScreen;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget v0, v0, Lrexsee/core/application/RexseeApplication;->screenHeight:I

    return v0
.end method

.method public getScreenOrientation()Ljava/lang/String;
    .locals 1

    .prologue
    .line 107
    iget-object v0, p0, Lrexsee/device/RexseeScreen;->screenOrientation:Ljava/lang/String;

    return-object v0
.end method

.method public getScreenWidth()I
    .locals 1

    .prologue
    .line 132
    iget-object v0, p0, Lrexsee/device/RexseeScreen;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget v0, v0, Lrexsee/core/application/RexseeApplication;->screenWidth:I

    return v0
.end method

.method public isAutomaticBrightnessEnabled()Z
    .locals 5

    .prologue
    const/4 v3, 0x1

    const/4 v4, 0x0

    .line 178
    :try_start_0
    iget-object v2, p0, Lrexsee/device/RexseeScreen;->mContext:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    .line 179
    .local v1, "resolver":Landroid/content/ContentResolver;
    const-string v2, "screen_brightness_mode"

    invoke-static {v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;)I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v2

    if-ne v2, v3, :cond_0

    move v2, v3

    .line 182
    .end local v1    # "resolver":Landroid/content/ContentResolver;
    :goto_0
    return v2

    .restart local v1    # "resolver":Landroid/content/ContentResolver;
    :cond_0
    move v2, v4

    .line 179
    goto :goto_0

    .line 180
    .end local v1    # "resolver":Landroid/content/ContentResolver;
    :catch_0
    move-exception v2

    move-object v0, v2

    .line 181
    .local v0, "e":Ljava/lang/Exception;
    iget-object v2, p0, Lrexsee/device/RexseeScreen;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/device/RexseeScreen;->getInterfaceName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3, v0}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/Exception;)V

    move v2, v4

    .line 182
    goto :goto_0
.end method

.method public isFullScreen()Z
    .locals 1

    .prologue
    .line 129
    iget-boolean v0, p0, Lrexsee/device/RexseeScreen;->fullScreen:Z

    return v0
.end method

.method public isScreenAlwaysOn()Z
    .locals 1

    .prologue
    .line 158
    iget-boolean v0, p0, Lrexsee/device/RexseeScreen;->screenAlwaysOn:Z

    return v0
.end method

.method public printBrowser(Ljava/lang/String;ZI)Z
    .locals 2
    .param p1, "path"    # Ljava/lang/String;
    .param p2, "isPng"    # Z
    .param p3, "jpegQuality"    # I

    .prologue
    .line 165
    iget-object v0, p0, Lrexsee/device/RexseeScreen;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, p0, Lrexsee/device/RexseeScreen;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-static {v0, p1, v1, p2, p3}, Lrexsee/device/RexseeScreen;->printView(Lrexsee/core/browser/Browser;Ljava/lang/String;Landroid/view/View;ZI)Z

    move-result v0

    return v0
.end method

.method public printLayout(Ljava/lang/String;ZI)Z
    .locals 2
    .param p1, "path"    # Ljava/lang/String;
    .param p2, "isPng"    # Z
    .param p3, "jpegQuality"    # I

    .prologue
    .line 162
    iget-object v0, p0, Lrexsee/device/RexseeScreen;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, p0, Lrexsee/device/RexseeScreen;->mLayout:Lrexsee/core/browser/clazz/RootViewInterface;

    invoke-interface {v1}, Lrexsee/core/browser/clazz/RootViewInterface;->getView()Landroid/view/View;

    move-result-object v1

    invoke-static {v0, p1, v1, p2, p3}, Lrexsee/device/RexseeScreen;->printView(Lrexsee/core/browser/Browser;Ljava/lang/String;Landroid/view/View;ZI)Z

    move-result v0

    return v0
.end method

.method public setFullScreen(Z)V
    .locals 2
    .param p1, "isFullScreen"    # Z

    .prologue
    .line 116
    iput-boolean p1, p0, Lrexsee/device/RexseeScreen;->fullScreen:Z

    .line 117
    iget-object v0, p0, Lrexsee/device/RexseeScreen;->mContext:Landroid/content/Context;

    check-cast v0, Landroid/app/Activity;

    new-instance v1, Lrexsee/device/RexseeScreen$1;

    invoke-direct {v1, p0, p1}, Lrexsee/device/RexseeScreen$1;-><init>(Lrexsee/device/RexseeScreen;Z)V

    invoke-virtual {v0, v1}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V

    .line 127
    return-void
.end method

.method public setScreenAlwaysOn(Z)V
    .locals 2
    .param p1, "isAlwaysOn"    # Z

    .prologue
    .line 145
    iput-boolean p1, p0, Lrexsee/device/RexseeScreen;->screenAlwaysOn:Z

    .line 146
    iget-object v0, p0, Lrexsee/device/RexseeScreen;->mContext:Landroid/content/Context;

    check-cast v0, Landroid/app/Activity;

    new-instance v1, Lrexsee/device/RexseeScreen$2;

    invoke-direct {v1, p0, p1}, Lrexsee/device/RexseeScreen$2;-><init>(Lrexsee/device/RexseeScreen;Z)V

    invoke-virtual {v0, v1}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V

    .line 156
    return-void
.end method

.method public setScreenBrightness(IZ)V
    .locals 5
    .param p1, "brightness"    # I
    .param p2, "save"    # Z

    .prologue
    const-string v3, "screen_brightness"

    .line 196
    :try_start_0
    iget-object v3, p0, Lrexsee/device/RexseeScreen;->mContext:Landroid/content/Context;

    check-cast v3, Landroid/app/Activity;

    new-instance v4, Lrexsee/device/RexseeScreen$3;

    invoke-direct {v4, p0, p1}, Lrexsee/device/RexseeScreen$3;-><init>(Lrexsee/device/RexseeScreen;I)V

    invoke-virtual {v3, v4}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V

    .line 205
    if-eqz p2, :cond_0

    .line 206
    iget-object v3, p0, Lrexsee/device/RexseeScreen;->mContext:Landroid/content/Context;

    invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    .line 207
    .local v1, "resolver":Landroid/content/ContentResolver;
    const-string v3, "screen_brightness"

    invoke-static {v3}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v2

    .line 208
    .local v2, "uri":Landroid/net/Uri;
    const-string v3, "screen_brightness"

    invoke-static {v1, v3, p1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z

    .line 209
    const/4 v3, 0x0

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentResolver;->notifyChange(Landroid/net/Uri;Landroid/database/ContentObserver;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 214
    .end local v1    # "resolver":Landroid/content/ContentResolver;
    .end local v2    # "uri":Landroid/net/Uri;
    :cond_0
    :goto_0
    return-void

    .line 211
    :catch_0
    move-exception v3

    move-object v0, v3

    .line 212
    .local v0, "e":Ljava/lang/Exception;
    iget-object v3, p0, Lrexsee/device/RexseeScreen;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/device/RexseeScreen;->getInterfaceName()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4, v0}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public setScreenOrientation(Ljava/lang/String;)V
    .locals 3
    .param p1, "orientation"    # Ljava/lang/String;

    .prologue
    const-string v2, "portrait"

    const-string v1, "landscape"

    .line 88
    const-string v0, "portrait"

    invoke-virtual {p1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 89
    const-string v0, "portrait"

    iput-object v2, p0, Lrexsee/device/RexseeScreen;->screenOrientation:Ljava/lang/String;

    .line 90
    iget-object p0, p0, Lrexsee/device/RexseeScreen;->mContext:Landroid/content/Context;

    .end local p0    # "this":Lrexsee/device/RexseeScreen;
    check-cast p0, Landroid/app/Activity;

    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Landroid/app/Activity;->setRequestedOrientation(I)V

    .line 98
    :goto_0
    return-void

    .line 91
    .restart local p0    # "this":Lrexsee/device/RexseeScreen;
    :cond_0
    const-string v0, "landscape"

    invoke-virtual {p1, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 92
    const-string v0, "landscape"

    iput-object v1, p0, Lrexsee/device/RexseeScreen;->screenOrientation:Ljava/lang/String;

    .line 93
    iget-object p0, p0, Lrexsee/device/RexseeScreen;->mContext:Landroid/content/Context;

    .end local p0    # "this":Lrexsee/device/RexseeScreen;
    check-cast p0, Landroid/app/Activity;

    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Landroid/app/Activity;->setRequestedOrientation(I)V

    goto :goto_0

    .line 95
    .restart local p0    # "this":Lrexsee/device/RexseeScreen;
    :cond_1
    const-string v0, "auto"

    iput-object v0, p0, Lrexsee/device/RexseeScreen;->screenOrientation:Ljava/lang/String;

    .line 96
    iget-object p0, p0, Lrexsee/device/RexseeScreen;->mContext:Landroid/content/Context;

    .end local p0    # "this":Lrexsee/device/RexseeScreen;
    check-cast p0, Landroid/app/Activity;

    const/4 v0, -0x1

    invoke-virtual {p0, v0}, Landroid/app/Activity;->setRequestedOrientation(I)V

    goto :goto_0
.end method

.method public toggleScreenOrientation()V
    .locals 4

    .prologue
    const-string v3, "portrait"

    const-string v2, "landscape"

    .line 100
    iget-object v0, p0, Lrexsee/device/RexseeScreen;->screenOrientation:Ljava/lang/String;

    const-string v1, "portrait"

    invoke-virtual {v0, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 101
    const-string v0, "landscape"

    invoke-virtual {p0, v2}, Lrexsee/device/RexseeScreen;->setScreenOrientation(Ljava/lang/String;)V

    .line 105
    :cond_0
    :goto_0
    return-void

    .line 102
    :cond_1
    iget-object v0, p0, Lrexsee/device/RexseeScreen;->screenOrientation:Ljava/lang/String;

    const-string v1, "landscape"

    invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 103
    const-string v0, "portrait"

    invoke-virtual {p0, v3}, Lrexsee/device/RexseeScreen;->setScreenOrientation(Ljava/lang/String;)V

    goto :goto_0
.end method
